<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title th:text="${pageTitle}">首页</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            max-width: 800px;
            margin: 0 auto;
            padding: 20px;
            line-height: 1.6;
        }
        .header {
            color: #2c3e50;
            border-bottom: 2px solid #3498db;
            padding-bottom: 10px;
        }
        .content {
            margin: 20px 0;
        }
        .features {
            background-color: #f8f9fa;
            padding: 15px;
            border-radius: 5px;
        }
        .time {
            color: #7f8c8d;
            font-style: italic;
        }
        .nav {
            margin-bottom: 20px;
        }
        .nav a {
            margin-right: 15px;
            text-decoration: none;
            color: #3498db;
        }
        .nav a:hover {
            text-decoration: underline;
        }
    </style>
</head>
<body>
    <div class="header">
        <h1>待信审订单</h1>
    </div>
    
    <div class="content">
        <!-- 新增：待信审订单表格 -->
        <div class="order-table-container">
            <h3>待审核订单列表</h3>
            <table class="order-table">
                <thead>
                    <tr>
                        <th>订单编号</th>
                        <th>姓名</th>
                        <th>电话</th>
                        <th>身份证</th>
                        <th>订单状态</th>
						<th>创建时间</th>
                        <th>操作</th>
                    </tr>
                </thead>
                <tbody>
                    <!-- 循环渲染订单数据，${orders} 需从Controller传入（List<Order>类型） -->
                    <tr th:each="order : ${orders}">
                        <td th:text="${order.ordercode}"></td>
                        <td th:text="${order.name}"></td>
                        <td th:text="${order.phone}"></td>
                        <td th:text="${order.idCard}"></td>
                        <td>
                            <span class="status-pending" th:text="${order.status}"></span>
                        </td>
						<td th:text="${order.createdTime}"></td>
                        <td>
                            <!-- 审核操作按钮，链接携带订单ID -->
                            <a th:href="@{/api/info/detail(ordercode=${order.ordercode})}" class="btn-audit">去审核</a>
                        </td>
                    </tr>
					
                    <tr th:if="${#lists.isEmpty(orders)}">
                        <td colspan="7" class="no-data">暂无待审核订单</td>
                    </tr>
                </tbody>
            </table>
        </div>
    </div>

    <!-- 新增表格样式，与原有样式统一 -->
    <style>
        /* 原有基础样式（若已有可忽略） */
        body {
            font-family: Arial, sans-serif;
            max-width: 1200px;
            margin: 0 auto;
            padding: 20px;
            line-height: 1.6;
        }
        .header {
            color: #2c3e50;
            border-bottom: 2px solid #3498db;
            padding-bottom: 10px;
            margin-bottom: 30px;
        }
        .content {
            margin: 20px 0;
        }
        .features {
            margin-top: 40px;
            padding-top: 20px;
            border-top: 1px dashed #eee;
        }

        /* 新增表格样式 */
        .order-table-container {
            margin-bottom: 20px;
        }
        .order-table {
            width: 100%;
            border-collapse: collapse;
            margin-top: 10px;
            text-align: center;
        }
        .order-table th, .order-table td {
            padding: 12px 15px;
            border: 1px solid #e0e0e0;
        }
        .order-table th {
            background-color: #f8f9fa;
            font-weight: bold;
            color: #495057;
        }
        .order-table tbody tr:hover {
            background-color: #f5f5f5;
        }
        .status-pending {
            color: #ff7f0e;
            font-weight: 500;
        }
        .btn-audit {
            display: inline-block;
            padding: 6px 12px;
            background-color: #3498db;
            color: white;
            text-decoration: none;
            border-radius: 4px;
            font-size: 14px;
        }
        .btn-audit:hover {
            background-color: #2980b9;
        }
        .no-data {
            color: #6c757d;
            padding: 20px 0;
        }
    </style>
</body>

</html>
